#include "dyn_planarBilliard_nextImpactFunction.h"

NextImpactFunction::NextImpactFunction(Functor &_boundary, double _impactPoint, double _direction)
    : boundary(_boundary)
{
    setInputImpactPoint(_impactPoint);
    setDirection(_direction);
}

double NextImpactFunction::operator ()(const double x)
{
    return boundary(impactPoint)*sin(direction-impactPoint)-boundary(x)*sin(direction-x);
}
